import 'package:flutter/material.dart';

class I18nDemo extends StatelessWidget {
  const I18nDemo({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('I18nDemo'),
        elevation: 0.0,
      ),
      body: I18mDemoHome(),
    );
  }
}

class I18mDemoHome extends StatefulWidget {
  I18mDemoHome({Key key}) : super(key: key);

  @override
  _I18mDemoHomeState createState() => _I18mDemoHomeState();
}

class _I18mDemoHomeState extends State<I18mDemoHome> {
  @override
  Widget build(BuildContext context) {
    Locale locale = Localizations.localeOf(context);

    return Container(
       child: Center(
         child: Column(
           mainAxisAlignment: MainAxisAlignment.center,
           children: <Widget>[
             Text('${locale.toString()}')
           ]
         )
       ),
    );
  }
}